package cn.bearspark.happening.provider.rpc;

import cn.bearspark.happening.dto.booklive.CancelReqDTO;
import cn.bearspark.happening.dto.booklive.StateReqDTO;
import cn.bearspark.happening.provider.service.BookLiveService;
import cn.bearspark.happening.rpc.BookLiveRpc;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;

/**
 * @author f
 */
@Component
@DubboService
public class BookLiveRpcImpl implements BookLiveRpc {

    private final BookLiveService bookLiveService;

    public BookLiveRpcImpl(BookLiveService bookLiveService) {
        this.bookLiveService = bookLiveService;
    }

    @Override
    public void cancel(CancelReqDTO cancelReqDTO) {
        bookLiveService.cancel(cancelReqDTO);
    }

    @Override
    public void state(StateReqDTO stateReqDTO) {
        bookLiveService.state(stateReqDTO);
    }
}
